package ${Service};

import ${Dto}.${entity}Dto;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import ${Entity}.${entity};
import ${Vo}.${entity}Vo;
import java.util.Map;
import cn.airfei.aircore.core.storage.PageParam;
import java.util.List;

/**
 * <p>
 * ${table.comment!}
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
<#if kotlin>
interface ${table.serviceName} : ${superServiceClass}<${entity}>
<#else>
public interface I${entity}Service  {

    /**
     *
     * @param ${entity?uncap_first}Dto
     * @param pageParam
     * @return
     */
    Page<${entity}Vo> index(${entity}Dto ${entity?uncap_first}Dto,PageParam pageParam);

    /**
     * 分页查询单表数据
     *
     * @param map
     * @return
     */
    Page<${entity}Vo> singleTablePage(Map<String, Object> map);

    /**
     * 显示单条数据
     *
     * @param id
     * @return
     */
    ${entity}Vo show(String id);

    /**
     * 删除（销毁表数据）
     *
     * @param ids
     * @return
     */
    Integer destroy(String ids);

    /**
     * 更新表数据
     *
     * @param ${entity?uncap_first}Dto
     * @return
     */
    Integer update(${entity}Dto ${entity?uncap_first}Dto);

    /**
     * 保存表数据
     *
     * @param ${entity?uncap_first}Dto
     * @return
     */
    Integer store(${entity}Dto ${entity?uncap_first}Dto);

    /**
     * 设置状态，1:正常,2:禁用/待审核，-1:已删除
     *
     * @param id
     * @param status
     * @return
     */
    boolean setStatus(<#list table.fields as field><#if field.keyFlag>${field.propertyType}</#if></#list> id,Integer status);

    /**
     * get all resource in storage
     * @return
     */
    List<${entity}Vo> getList(Map<String,Object> map);

    /**
     * 更新多条数据（主键id必传）
     *
     * @return
     */
    List<${entity}Vo> updateBatch(List<${entity}Dto> ${entity?uncap_first}DtoList);

    /**
     * 添加多条数据
     *
     * @return
     */
    List<${entity}Vo> saveBatch(List<${entity}Dto> ${entity?uncap_first}DtoList);

}
</#if>
